import pika
import json
import sys

credentials = pika.PlainCredentials("admin", "123456")
connection = pika.BlockingConnection(pika.ConnectionParameters('10.4.7.201', 5672, '/', credentials))
channel = connection.channel()


channel.exchange_declare(exchange='DB', exchange_type='direct', durable=True)

channel.queue_declare(queue='queue01', durable=True)
channel.queue_bind(exchange='DB', queue='queue01', routing_key='order')

channel.queue_declare(queue='queue02', durable=True)
channel.queue_bind(exchange='DB', queue='queue02', routing_key='historyorder')

channel.queue_declare(queue='queue03', durable=True)
channel.queue_bind(exchange='DB', queue='queue03', routing_key='balance')
